/**
 * File Name	: IGenericHibernateDao.java
 * Author		: 1340079:Adelwin
 * Create Date	: Apr 30, 2010:4:48:31 PM
 *
 */

package org.jampang.core.dao;

import java.io.Serializable;
import java.util.List;

import org.jampang.core.exception.GenericDaoException;
import org.jampang.core.model.BaseModel;

public interface IGenericHibernateDao<T extends BaseModel, ID extends Serializable> {
	public T getById(final ID id) throws GenericDaoException;
	public List<T> getListByCriteria(T criterion) throws GenericDaoException;
	public List<T> getListByCriteria(T criterion, boolean wildcard) throws GenericDaoException;
	public List<T> getListByCriteria(T criterion, int sizeLimit) throws GenericDaoException;
	public List<T> getListByCriteria(T criterion, int sizeLimit, boolean wildcard) throws GenericDaoException;
	public List<T> getListByCriteria(T criterion, int indexStart, int sizeLimit) throws GenericDaoException;
	public List<T> getListByCriteria(T criterion, int indexStart, int sizeLimit, boolean wildcard) throws GenericDaoException;
	
	public void save(T criterion) throws GenericDaoException;
	public void delete(T criterion) throws GenericDaoException;
}
